package com.woniuxueyuan;

/**
 * Hello world!
 *
 */
public class App 
{


    public static void main(String[] args ) {
//        MyInterface myInterface = new MyInterface() {
//            @Override
//            public void show(){
//                System.out.println("show");
//            }
//
//        };
//        MyInterface myInterface = () -> System.out.println("show");
//        myInterface.show();
//        Runnable runnable= () -> System.out.println("aa");


//        MyInterface myInterface = new MyInterface() {
//
//            @Override
//            public void show(String name) {
//                System.out.println("hello"+name);
//            }
//        };
//       MyInterface myInterface = name -> System.out.println("hello"+name);
//       myInterface.show("tom");
        MyInterface myInterface=(a,b) ->{
            int result=a+b;
            return  result;
        };
        int sum=myInterface.sum(1,1);
        System.out.println(sum);
    }
}
